3.29 \(\int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx\)

Optimal. Leaf size=71 \[ \frac {\sqrt {b} (a+b) \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{5/2} f}-\frac {(a+b) \cos (e+f x)}{a^2 f}+\frac {\cos ^3(e+f x)}{3 a f} \]

[Out]

-(a+b)*cos(f*x+e)/a^2/f+1/3*cos(f*x+e)^3/a/f+(a+b)*arctan(cos(f*x+e)*a^(1/2)/b^(1/2))*b^(1/2)/a^(5/2)/f

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {4133, 459, 321, 205} \[ -\frac {(a+b) \cos (e+f x)}{a^2 f}+\frac {\sqrt {b} (a+b) \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{5/2} f}+\frac {\cos ^3(e+f x)}{3 a f} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^3/(a + b*Sec[e + f*x]^2),x]

[Out]

(Sqrt[b]*(a + b)*ArcTan[(Sqrt[a]*Cos[e + f*x])/Sqrt[b]])/(a^(5/2)*f) - ((a + b)*Cos[e + f*x])/(a^2*f) + Cos[e
+ f*x]^3/(3*a*f)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 459

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(b*e*(m + n*(p + 1) + 1)), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rubi steps

\begin {align*} \int \frac {\sin ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x^2 \left (1-x^2\right )}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=\frac {\cos ^3(e+f x)}{3 a f}-\frac {(a+b) \operatorname {Subst}\left (\int \frac {x^2}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{a f}\\ &=-\frac {(a+b) \cos (e+f x)}{a^2 f}+\frac {\cos ^3(e+f x)}{3 a f}+\frac {(b (a+b)) \operatorname {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{a^2 f}\\ &=\frac {\sqrt {b} (a+b) \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{5/2} f}-\frac {(a+b) \cos (e+f x)}{a^2 f}+\frac {\cos ^3(e+f x)}{3 a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.39, size = 376, normalized size = 5.30 \[ \frac {\sec ^2(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (3 \left (a^2+8 a b+8 b^2\right ) \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )+3 \left (a^2+8 a b+8 b^2\right ) \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )-3 a^2 \tan ^{-1}\left (\frac {\sqrt {a}-\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )-3 a^2 \tan ^{-1}\left (\frac {\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )+\sqrt {a}}{\sqrt {b}}\right )+4 \sqrt {a} \sqrt {b} \cos (e+f x) (a \cos (2 (e+f x))-5 a-6 b)\right )}{48 a^{5/2} \sqrt {b} f \left (a+b \sec ^2(e+f x)\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]^3/(a + b*Sec[e + f*x]^2),x]

[Out]

((a + 2*b + a*Cos[2*(e + f*x)])*(3*(a^2 + 8*a*b + 8*b^2)*ArcTan[((-Sqrt[a] - I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Si
n[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] - Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[
b]] + 3*(a^2 + 8*a*b + 8*b^2)*ArcTan[((-Sqrt[a] + I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/
2] + Cos[e]*(Sqrt[a] + Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]] - 3*a^2*ArcTan[(Sqrt[a]
 - Sqrt[a + b]*Tan[(e + f*x)/2])/Sqrt[b]] - 3*a^2*ArcTan[(Sqrt[a] + Sqrt[a + b]*Tan[(e + f*x)/2])/Sqrt[b]] + 4
*Sqrt[a]*Sqrt[b]*Cos[e + f*x]*(-5*a - 6*b + a*Cos[2*(e + f*x)]))*Sec[e + f*x]^2)/(48*a^(5/2)*Sqrt[b]*f*(a + b*
Sec[e + f*x]^2))

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 154, normalized size = 2.17 \[ \left [\frac {2 \, a \cos \left (f x + e\right )^{3} + 3 \, {\left (a + b\right )} \sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right ) - 6 \, {\left (a + b\right )} \cos \left (f x + e\right )}{6 \, a^{2} f}, \frac {a \cos \left (f x + e\right )^{3} + 3 \, {\left (a + b\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right ) - 3 \, {\left (a + b\right )} \cos \left (f x + e\right )}{3 \, a^{2} f}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

[1/6*(2*a*cos(f*x + e)^3 + 3*(a + b)*sqrt(-b/a)*log(-(a*cos(f*x + e)^2 + 2*a*sqrt(-b/a)*cos(f*x + e) - b)/(a*c
os(f*x + e)^2 + b)) - 6*(a + b)*cos(f*x + e))/(a^2*f), 1/3*(a*cos(f*x + e)^3 + 3*(a + b)*sqrt(b/a)*arctan(a*sq
rt(b/a)*cos(f*x + e)/b) - 3*(a + b)*cos(f*x + e))/(a^2*f)]

________________________________________________________________________________________

giac [A]  time = 0.25, size = 89, normalized size = 1.25 \[ \frac {{\left (a b + b^{2}\right )} \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2} f} + \frac {a^{2} f^{5} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{5} \cos \left (f x + e\right ) - 3 \, a b f^{5} \cos \left (f x + e\right )}{3 \, a^{3} f^{6}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

(a*b + b^2)*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2*f) + 1/3*(a^2*f^5*cos(f*x + e)^3 - 3*a^2*f^5*cos(f
*x + e) - 3*a*b*f^5*cos(f*x + e))/(a^3*f^6)

________________________________________________________________________________________

maple [A]  time = 0.93, size = 103, normalized size = 1.45 \[ \frac {\cos ^{3}\left (f x +e \right )}{3 a f}-\frac {\cos \left (f x +e \right )}{a f}-\frac {b \cos \left (f x +e \right )}{f \,a^{2}}+\frac {b \arctan \left (\frac {a \cos \left (f x +e \right )}{\sqrt {a b}}\right )}{f a \sqrt {a b}}+\frac {b^{2} \arctan \left (\frac {a \cos \left (f x +e \right )}{\sqrt {a b}}\right )}{f \,a^{2} \sqrt {a b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^3/(a+b*sec(f*x+e)^2),x)

[Out]

1/3*cos(f*x+e)^3/a/f-cos(f*x+e)/a/f-1/f/a^2*b*cos(f*x+e)+1/f*b/a/(a*b)^(1/2)*arctan(a*cos(f*x+e)/(a*b)^(1/2))+
1/f*b^2/a^2/(a*b)^(1/2)*arctan(a*cos(f*x+e)/(a*b)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 63, normalized size = 0.89 \[ \frac {\frac {3 \, {\left (a b + b^{2}\right )} \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {a \cos \left (f x + e\right )^{3} - 3 \, {\left (a + b\right )} \cos \left (f x + e\right )}{a^{2}}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

1/3*(3*(a*b + b^2)*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2) + (a*cos(f*x + e)^3 - 3*(a + b)*cos(f*x +
e))/a^2)/f

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 76, normalized size = 1.07 \[ \frac {{\cos \left (e+f\,x\right )}^3}{3\,a\,f}-\frac {\cos \left (e+f\,x\right )\,\left (\frac {b}{a^2}+\frac {1}{a}\right )}{f}+\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\sqrt {b}\,\cos \left (e+f\,x\right )\,\left (a+b\right )}{b^2+a\,b}\right )\,\left (a+b\right )}{a^{5/2}\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^3/(a + b/cos(e + f*x)^2),x)

[Out]

cos(e + f*x)^3/(3*a*f) - (cos(e + f*x)*(b/a^2 + 1/a))/f + (b^(1/2)*atan((a^(1/2)*b^(1/2)*cos(e + f*x)*(a + b))
/(a*b + b^2))*(a + b))/(a^(5/2)*f)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**3/(a+b*sec(f*x+e)**2),x)

[Out]

Timed out

________________________________________________________________________________________